﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using DataAnalyseTool.Repository;
using System.Data;
using DataAnalyseTool.Model;

namespace DataAnalyseTool.BusinessTier.Bll
{
  public class RegisterBLL
  {
    public static DataTable GetAllRegister()
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.GetAllRegister();
    }
    public static DataTable GetRegister(string qq, int shopid, int limitdays)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.GetRegister(qq, shopid, limitdays);
    }


    public static DataSet GetAllRegisterByPagination(string tablename1, string tablename2, string selectfield, string sqlwhere, string orderbyfield, int pagesize, int page, out int count)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.GetAllRegisterByPagination(tablename1, tablename2, selectfield, sqlwhere, orderbyfield, pagesize, page, out count);
    }

    public static DataTable GetRegisterByPara(string key)
    {
      RegisterDAL rd = new RegisterDAL();

      return rd.GetRegisterByPara(key);
    }

   
    public static DataTable GetAllMoney(SearchPara sp)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.GetAllMoney(sp);
    }
    public static DataTable GetAllRegisterBySearchPara(SearchPara sp, int pagesize, int page, out int count)
    {
      RegisterDAL rd = new RegisterDAL();

      return rd.GetAllRegisterBySearchPara(sp, pagesize, page, out count);
    }

    public static DataTable GetRegister(string whereField, string fieldValue)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.GetRegister(whereField, fieldValue);
    }
    public static int AddRegister(Register r)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.AddRegister(r);
    }

    public static DataTable CopyRegister(int ProId, string user)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.CopyRegister(ProId, user);
    }
    public static DataTable GetRecentRegister(string wangwang, string shopname)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.GetRecentRegister(wangwang, shopname);
    }
    public static int UpdateRegister(Register register, string where, string value)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.UpdateRegister(register, where, value);
    }

    public static int DeleteRegister(string proid)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.DeleteRegister(proid);
    }
    public static DataTable GetRegisterDataBySql(string strSql)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.GetRegisterDataBySql(strSql);
    }

    public static List<string> GetAllRelatesQQByQQ(string qq)
    {
      RegisterDAL rd = new RegisterDAL();
      return rd.GetAllRelationQQs(qq);
    }
  }
}